3.70 \(\int \frac{(a+b x)^2}{c+d x^3} \, dx\)

Optimal. Leaf size=186 \[ \frac{a \left (2 b \sqrt [3]{c}-a \sqrt [3]{d}\right ) \log \left (c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2\right )}{6 c^{2/3} d^{2/3}}-\frac{a \left (2 b \sqrt [3]{c}-a \sqrt [3]{d}\right ) \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c^{2/3} d^{2/3}}-\frac{a \left (a \sqrt [3]{d}+2 b \sqrt [3]{c}\right ) \tan ^{-1}\left (\frac{\sqrt [3]{c}-2 \sqrt [3]{d} x}{\sqrt{3} \sqrt [3]{c}}\right )}{\sqrt{3} c^{2/3} d^{2/3}}+\frac{b^2 \log \left (c+d x^3\right )}{3 d} \]

[Out]

-((a*(2*b*c^(1/3) + a*d^(1/3))*ArcTan[(c^(1/3) - 2*d^(1/3)*x)/(Sqrt[3]*c^(1/3))])/(Sqrt[3]*c^(2/3)*d^(2/3))) -
 (a*(2*b*c^(1/3) - a*d^(1/3))*Log[c^(1/3) + d^(1/3)*x])/(3*c^(2/3)*d^(2/3)) + (a*(2*b*c^(1/3) - a*d^(1/3))*Log
[c^(2/3) - c^(1/3)*d^(1/3)*x + d^(2/3)*x^2])/(6*c^(2/3)*d^(2/3)) + (b^2*Log[c + d*x^3])/(3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.177635, antiderivative size = 186, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 8, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.471, Rules used = {1871, 1860, 31, 634, 617, 204, 628, 260} \[ \frac{a \left (2 b \sqrt [3]{c}-a \sqrt [3]{d}\right ) \log \left (c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2\right )}{6 c^{2/3} d^{2/3}}-\frac{a \left (2 b \sqrt [3]{c}-a \sqrt [3]{d}\right ) \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c^{2/3} d^{2/3}}-\frac{a \left (a \sqrt [3]{d}+2 b \sqrt [3]{c}\right ) \tan ^{-1}\left (\frac{\sqrt [3]{c}-2 \sqrt [3]{d} x}{\sqrt{3} \sqrt [3]{c}}\right )}{\sqrt{3} c^{2/3} d^{2/3}}+\frac{b^2 \log \left (c+d x^3\right )}{3 d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x)^2/(c + d*x^3),x]

[Out]

-((a*(2*b*c^(1/3) + a*d^(1/3))*ArcTan[(c^(1/3) - 2*d^(1/3)*x)/(Sqrt[3]*c^(1/3))])/(Sqrt[3]*c^(2/3)*d^(2/3))) -
 (a*(2*b*c^(1/3) - a*d^(1/3))*Log[c^(1/3) + d^(1/3)*x])/(3*c^(2/3)*d^(2/3)) + (a*(2*b*c^(1/3) - a*d^(1/3))*Log
[c^(2/3) - c^(1/3)*d^(1/3)*x + d^(2/3)*x^2])/(6*c^(2/3)*d^(2/3)) + (b^2*Log[c + d*x^3])/(3*d)

Rule 1871

Int[(P2_)/((a_) + (b_.)*(x_)^3), x_Symbol] :> With[{A = Coeff[P2, x, 0], B = Coeff[P2, x, 1], C = Coeff[P2, x,
 2]}, Int[(A + B*x)/(a + b*x^3), x] + Dist[C, Int[x^2/(a + b*x^3), x], x] /; EqQ[a*B^3 - b*A^3, 0] ||  !Ration
alQ[a/b]] /; FreeQ[{a, b}, x] && PolyQ[P2, x, 2]

Rule 1860

Int[((A_) + (B_.)*(x_))/((a_) + (b_.)*(x_)^3), x_Symbol] :> With[{r = Numerator[Rt[a/b, 3]], s = Denominator[R
t[a/b, 3]]}, -Dist[(r*(B*r - A*s))/(3*a*s), Int[1/(r + s*x), x], x] + Dist[r/(3*a*s), Int[(r*(B*r + 2*A*s) + s
*(B*r - A*s)*x)/(r^2 - r*s*x + s^2*x^2), x], x]] /; FreeQ[{a, b, A, B}, x] && NeQ[a*B^3 - b*A^3, 0] && PosQ[a/
b]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 617

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[(a*c)/b^2]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + (2*c*x)/b], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \frac{(a+b x)^2}{c+d x^3} \, dx &=b^2 \int \frac{x^2}{c+d x^3} \, dx+\int \frac{a^2+2 a b x}{c+d x^3} \, dx\\ &=\frac{b^2 \log \left (c+d x^3\right )}{3 d}+\frac{\int \frac{\sqrt [3]{c} \left (2 a b \sqrt [3]{c}+2 a^2 \sqrt [3]{d}\right )+\left (2 a b \sqrt [3]{c}-a^2 \sqrt [3]{d}\right ) \sqrt [3]{d} x}{c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2} \, dx}{3 c^{2/3} \sqrt [3]{d}}-\frac{\left (2 a b \sqrt [3]{c}-a^2 \sqrt [3]{d}\right ) \int \frac{1}{\sqrt [3]{c}+\sqrt [3]{d} x} \, dx}{3 c^{2/3} \sqrt [3]{d}}\\ &=-\frac{a \left (2 b \sqrt [3]{c}-a \sqrt [3]{d}\right ) \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c^{2/3} d^{2/3}}+\frac{b^2 \log \left (c+d x^3\right )}{3 d}+\frac{1}{2} \left (a \left (\frac{a}{\sqrt [3]{c}}+\frac{2 b}{\sqrt [3]{d}}\right )\right ) \int \frac{1}{c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2} \, dx+\frac{\left (a \left (2 b \sqrt [3]{c}-a \sqrt [3]{d}\right )\right ) \int \frac{-\sqrt [3]{c} \sqrt [3]{d}+2 d^{2/3} x}{c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2} \, dx}{6 c^{2/3} d^{2/3}}\\ &=-\frac{a \left (2 b \sqrt [3]{c}-a \sqrt [3]{d}\right ) \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c^{2/3} d^{2/3}}+\frac{a \left (2 b \sqrt [3]{c}-a \sqrt [3]{d}\right ) \log \left (c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2\right )}{6 c^{2/3} d^{2/3}}+\frac{b^2 \log \left (c+d x^3\right )}{3 d}+\frac{\left (a \left (2 b \sqrt [3]{c}+a \sqrt [3]{d}\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1-\frac{2 \sqrt [3]{d} x}{\sqrt [3]{c}}\right )}{c^{2/3} d^{2/3}}\\ &=-\frac{a \left (2 b \sqrt [3]{c}+a \sqrt [3]{d}\right ) \tan ^{-1}\left (\frac{\sqrt [3]{c}-2 \sqrt [3]{d} x}{\sqrt{3} \sqrt [3]{c}}\right )}{\sqrt{3} c^{2/3} d^{2/3}}-\frac{a \left (2 b \sqrt [3]{c}-a \sqrt [3]{d}\right ) \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c^{2/3} d^{2/3}}+\frac{a \left (2 b \sqrt [3]{c}-a \sqrt [3]{d}\right ) \log \left (c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2\right )}{6 c^{2/3} d^{2/3}}+\frac{b^2 \log \left (c+d x^3\right )}{3 d}\\ \end{align*}

Mathematica [A]  time = 0.0843078, size = 200, normalized size = 1.08 \[ -\frac{\left (a^2 \sqrt [3]{c} \sqrt [3]{d}-2 a b c^{2/3}\right ) \log \left (c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2\right )}{6 c d^{2/3}}+\frac{\left (a^2 \sqrt [3]{c} \sqrt [3]{d}-2 a b c^{2/3}\right ) \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c d^{2/3}}+\frac{\left (a^2 \sqrt [3]{c} \sqrt [3]{d}+2 a b c^{2/3}\right ) \tan ^{-1}\left (\frac{2 \sqrt [3]{d} x-\sqrt [3]{c}}{\sqrt{3} \sqrt [3]{c}}\right )}{\sqrt{3} c d^{2/3}}+\frac{b^2 \log \left (c+d x^3\right )}{3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x)^2/(c + d*x^3),x]

[Out]

((2*a*b*c^(2/3) + a^2*c^(1/3)*d^(1/3))*ArcTan[(-c^(1/3) + 2*d^(1/3)*x)/(Sqrt[3]*c^(1/3))])/(Sqrt[3]*c*d^(2/3))
 + ((-2*a*b*c^(2/3) + a^2*c^(1/3)*d^(1/3))*Log[c^(1/3) + d^(1/3)*x])/(3*c*d^(2/3)) - ((-2*a*b*c^(2/3) + a^2*c^
(1/3)*d^(1/3))*Log[c^(2/3) - c^(1/3)*d^(1/3)*x + d^(2/3)*x^2])/(6*c*d^(2/3)) + (b^2*Log[c + d*x^3])/(3*d)

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 211, normalized size = 1.1 \begin{align*}{\frac{{a}^{2}}{3\,d}\ln \left ( x+\sqrt [3]{{\frac{c}{d}}} \right ) \left ({\frac{c}{d}} \right ) ^{-{\frac{2}{3}}}}-{\frac{{a}^{2}}{6\,d}\ln \left ({x}^{2}-\sqrt [3]{{\frac{c}{d}}}x+ \left ({\frac{c}{d}} \right ) ^{{\frac{2}{3}}} \right ) \left ({\frac{c}{d}} \right ) ^{-{\frac{2}{3}}}}+{\frac{{a}^{2}\sqrt{3}}{3\,d}\arctan \left ({\frac{\sqrt{3}}{3} \left ( 2\,{x{\frac{1}{\sqrt [3]{{\frac{c}{d}}}}}}-1 \right ) } \right ) \left ({\frac{c}{d}} \right ) ^{-{\frac{2}{3}}}}-{\frac{2\,ab}{3\,d}\ln \left ( x+\sqrt [3]{{\frac{c}{d}}} \right ){\frac{1}{\sqrt [3]{{\frac{c}{d}}}}}}+{\frac{ab}{3\,d}\ln \left ({x}^{2}-\sqrt [3]{{\frac{c}{d}}}x+ \left ({\frac{c}{d}} \right ) ^{{\frac{2}{3}}} \right ){\frac{1}{\sqrt [3]{{\frac{c}{d}}}}}}+{\frac{2\,\sqrt{3}ab}{3\,d}\arctan \left ({\frac{\sqrt{3}}{3} \left ( 2\,{x{\frac{1}{\sqrt [3]{{\frac{c}{d}}}}}}-1 \right ) } \right ){\frac{1}{\sqrt [3]{{\frac{c}{d}}}}}}+{\frac{{b}^{2}\ln \left ( d{x}^{3}+c \right ) }{3\,d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^2/(d*x^3+c),x)

[Out]

1/3*a^2/d/(c/d)^(2/3)*ln(x+(c/d)^(1/3))-1/6*a^2/d/(c/d)^(2/3)*ln(x^2-(c/d)^(1/3)*x+(c/d)^(2/3))+1/3*a^2/d/(c/d
)^(2/3)*3^(1/2)*arctan(1/3*3^(1/2)*(2/(c/d)^(1/3)*x-1))-2/3*a*b/d/(c/d)^(1/3)*ln(x+(c/d)^(1/3))+1/3*a*b/d/(c/d
)^(1/3)*ln(x^2-(c/d)^(1/3)*x+(c/d)^(2/3))+2/3*a*b*3^(1/2)/d/(c/d)^(1/3)*arctan(1/3*3^(1/2)*(2/(c/d)^(1/3)*x-1)
)+1/3*b^2*ln(d*x^3+c)/d

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2/(d*x^3+c),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [C]  time = 8.10969, size = 10904, normalized size = 58.62 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2/(d*x^3+c),x, algorithm="fricas")

[Out]

-1/12*(2*(2*(1/2)^(2/3)*(b^4/d^2 - (b^4*c + 2*a^3*b*d)/(c*d^2))*(-I*sqrt(3) + 1)/(2*b^6/d^3 + (8*b^3*c + a^3*d
)*a^3/(c^2*d^2) - 3*(b^4*c + 2*a^3*b*d)*b^2/(c*d^3) + (b^6*c^2 - 2*a^3*b^3*c*d + a^6*d^2)/(c^2*d^3))^(1/3) + (
1/2)^(1/3)*(2*b^6/d^3 + (8*b^3*c + a^3*d)*a^3/(c^2*d^2) - 3*(b^4*c + 2*a^3*b*d)*b^2/(c*d^3) + (b^6*c^2 - 2*a^3
*b^3*c*d + a^6*d^2)/(c^2*d^3))^(1/3)*(I*sqrt(3) + 1) - 2*b^2/d)*d*log(2*b^5*c^2 + 7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))/d

________________________________________________________________________________________

Sympy [A]  time = 1.03391, size = 156, normalized size = 0.84 \begin{align*} \operatorname{RootSum}{\left (27 t^{3} c^{2} d^{3} - 27 t^{2} b^{2} c^{2} d^{2} + t \left (18 a^{3} b c d^{2} + 9 b^{4} c^{2} d\right ) - a^{6} d^{2} + 2 a^{3} b^{3} c d - b^{6} c^{2}, \left ( t \mapsto t \log{\left (x + \frac{18 t^{2} b c^{2} d^{2} + 3 t a^{3} c d^{2} - 12 t b^{3} c^{2} d + 7 a^{3} b^{2} c d + 2 b^{5} c^{2}}{a^{5} d^{2} + 8 a^{2} b^{3} c d} \right )} \right )\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**2/(d*x**3+c),x)

[Out]

RootSum(27*_t**3*c**2*d**3 - 27*_t**2*b**2*c**2*d**2 + _t*(18*a**3*b*c*d**2 + 9*b**4*c**2*d) - a**6*d**2 + 2*a
**3*b**3*c*d - b**6*c**2, Lambda(_t, _t*log(x + (18*_t**2*b*c**2*d**2 + 3*_t*a**3*c*d**2 - 12*_t*b**3*c**2*d +
 7*a**3*b**2*c*d + 2*b**5*c**2)/(a**5*d**2 + 8*a**2*b**3*c*d))))

________________________________________________________________________________________

Giac [A]  time = 1.09442, size = 262, normalized size = 1.41 \begin{align*} \frac{b^{2} \log \left ({\left | d x^{3} + c \right |}\right )}{3 \, d} - \frac{{\left (2 \, a b d \left (-\frac{c}{d}\right )^{\frac{1}{3}} + a^{2} d\right )} \left (-\frac{c}{d}\right )^{\frac{1}{3}} \log \left ({\left | x - \left (-\frac{c}{d}\right )^{\frac{1}{3}} \right |}\right )}{3 \, c d} + \frac{\sqrt{3}{\left (\left (-c d^{2}\right )^{\frac{1}{3}} a^{2} d - 2 \, \left (-c d^{2}\right )^{\frac{2}{3}} a b\right )} \arctan \left (\frac{\sqrt{3}{\left (2 \, x + \left (-\frac{c}{d}\right )^{\frac{1}{3}}\right )}}{3 \, \left (-\frac{c}{d}\right )^{\frac{1}{3}}}\right )}{3 \, c d^{2}} + \frac{{\left (\left (-c d^{2}\right )^{\frac{1}{3}} a^{2} c d^{3} + 2 \, \left (-c d^{2}\right )^{\frac{2}{3}} a b c d^{2}\right )} \log \left (x^{2} + x \left (-\frac{c}{d}\right )^{\frac{1}{3}} + \left (-\frac{c}{d}\right )^{\frac{2}{3}}\right )}{6 \, c^{2} d^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2/(d*x^3+c),x, algorithm="giac")

[Out]

1/3*b^2*log(abs(d*x^3 + c))/d - 1/3*(2*a*b*d*(-c/d)^(1/3) + a^2*d)*(-c/d)^(1/3)*log(abs(x - (-c/d)^(1/3)))/(c*
d) + 1/3*sqrt(3)*((-c*d^2)^(1/3)*a^2*d - 2*(-c*d^2)^(2/3)*a*b)*arctan(1/3*sqrt(3)*(2*x + (-c/d)^(1/3))/(-c/d)^
(1/3))/(c*d^2) + 1/6*((-c*d^2)^(1/3)*a^2*c*d^3 + 2*(-c*d^2)^(2/3)*a*b*c*d^2)*log(x^2 + x*(-c/d)^(1/3) + (-c/d)
^(2/3))/(c^2*d^4)